/*
 * busca.h
 *
 *  Created on: Jul 5, 2011
 *      Author: tualibano
 */

#ifndef BUSCA_H_
#define BUSCA_H_

typedef struct {
	char nomebusca[64];
	Vizinho searcher;
} busca_individual;

busca_individual *registrobusca;

// manda a busca
extern int buscarnarede(char *);

// recebe busca
extern int buscahandler(char *);

// criar junto com servidor UDP
extern int criatabela(busca_individual **);

extern int zerarbuscaind(busca_individual *);

extern int passeiporaqui(busca_individual **, char *, char *, char *, char *);

extern int buscaregtabela(busca_individual **, char *, char *, char *, char *); 

extern int printregtabela(busca_individual **);

extern int inseretabela(busca_individual **, char *, Vizinho );

extern int removetabela(busca_individual *, char *nomebusca, Vizinho *);

#endif /* BUSCA_H_ */